home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
CUG187.LZH
/
GETINT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1985-12-30
|
884b
|
29 lines
/*@*****************************************************/
/*@ */
/*@ getint - read in two binary bytes and treat them */
/*@ as a reverse 2-byte number. */
/*@ */
/*@ Usage: getint(fp); */
/*@ where fp is a file handle. */
/*@ Returns an int which is the binary value. */
/*@ */
/*@*****************************************************/
#include "stdio.h"
/*******************************************************/
int getint(fp)
FILE *fp; /* File to process */
/*
* Read two binary bytes and treat them as reverse 2-byte number.
*/
{
char c;
c = fgetc(fp);
return(c+(256*fgetc(fp)));
}